module(
    name = "deps-direct",
    version = "0.0.0",
)

# https://github.com/bazelbuild/rules_rust/releases
bazel_dep(name = "rules_rust", version = "0.65.0")

# Rust toolchain
RUST_EDITION = "2021"

RUST_VERSION = "1.84.0"

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
    edition = RUST_EDITION,
    versions = [RUST_VERSION],
)
use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")

crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")

# External crates
crate.spec(
    package = "arc-swap",
    version = "1.7",
)
crate.spec(
    features = ["derive"],
    package = "serde",
    version = "1.0",
)
crate.spec(
    package = "serde_json",
    version = "1.0",
)
crate.spec(
    default_features = False,
    features = [
        "macros",
        "net",
        "rt-multi-thread",
        "signal",
    ],
    package = "tokio",
    version = "1.40",
)
crate.spec(
    features = ["signal"],
    package = "tokio-cron-scheduler",
    version = "0.10",
)
crate.spec(
    package = "warp",
    version = "0.3",
)
crate.from_specs()
use_repo(crate, "crates")
